﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABELGX
{
    public class WarningItem : RegisterBool
    {
        public int Byte { get; set; }
        public int Bit { get; set; }
        public WarningItem(string name, int @byte, int bit, string falseText, string trueText)
        {
            Set = new CustomizeSet(0, true, name, trueText, falseText,"Red", "Lime");
            Byte = @byte;
            Bit = bit;
            PropertyChanged += WarningItem_PropertyChanged;
        }

        private void WarningItem_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            Config.WriteWarning($"{Set.Name},{(Value ? Set.TextOn : Set.TextOff)}");
        }

        public void Log()
        {
            
        }
    }
}
